Auto merge of #2818 - robinst:use-exec-for-cargo-run, r=alexcrichton
authorbors <bors@rust-lang.org>
Thu, 20 Oct 2016 17:58:29 +0000 (10:58 -0700)
committerGitHub <noreply@github.com>
Thu, 20 Oct 2016 17:58:29 +0000 (10:58 -0700)
Use CommandExt::exec for `cargo run` on Unix (#2343)

Before, we would spawn a child process for the program. One of the
problems with that is when killing the cargo process, the program
continues running.

With this change, the cargo process is replaced by the program, and
killing it works.

Before (`cargo run` is the parent):

> 502  7615  7614   0  2:26PM ttys012    0:00.12 /Users/rstocker/.multirust/toolchains/stable-x86_64-apple-darwin/bin/cargo run
> 502  7620  7615   0  2:26PM ttys012    0:00.01 target/debug/program

After (the shell is the parent):

> 502 81649 81648   0  5:27PM ttys012    0:00.69 -zsh
> 502  7739 81649   0  2:26PM ttys012    0:01.27 target/debug/program


Trivial merge